package o;

import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appgallery.foundation.store.bean.user.GetPersonalInfoResBean;
import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean;
import com.huawei.appgallery.serverreqkit.api.listener.IServerCallBack;

public class ekh {

    static class d implements IServerCallBack {
        private d() {
        }

        public void prePostResult(BaseRequest o_cvu, ResponseBean responseBean) {
        }

        public void notifyResult(BaseRequest o_cvu, ResponseBean responseBean) {
            if (responseBean != null && (responseBean instanceof GetPersonalInfoResBean)) {
                Logger.ˎ("PersonalInfoPreLoad", "updateRedPointStatus ");
                GetPersonalInfoResBean getPersonalInfoResBean = (GetPersonalInfoResBean) responseBean;
                ekg.ॱ().ˊ(getPersonalInfoResBean);
                emi.ˋ(getPersonalInfoResBean);
                if (responseBean.getResponseCode() == 0 && responseBean.getRtnCode_() == 0) {
                    if (getPersonalInfoResBean.ͺ() == 1) {
                        UserSession.getInstance().setPushOpen(true);
                    } else {
                        UserSession.getInstance().setPushOpen(false);
                    }
                    dzn.ॱ(getPersonalInfoResBean.ˋॱ());
                    ((cbd) fho.ˏ().ˋ("User").ॱ(cbd.class)).ˋ(ekh.ˊ(getPersonalInfoResBean));
                    return;
                }
                Logger.ˋ("PersonalInfoPreLoad", "error to get push info!");
                UserSession.getInstance().setPushOpen(false);
            }
        }
    }

    public static void ˊ() {
        cfw.ˎ(new cgh(), new d());
    }

    private static cbc ˊ(final GetPersonalInfoResBean getPersonalInfoResBean) {
        return new cbc() {
            public int ˎ() {
                return getPersonalInfoResBean.ˊ();
            }

            public String ˏ() {
                return getPersonalInfoResBean.ˎ();
            }

            public int ॱ() {
                return getPersonalInfoResBean.ˊॱ();
            }

            public int ˊ() {
                return getPersonalInfoResBean.ˋॱ();
            }
        };
    }
}
